<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/restrictiveFileUpload.js',CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/app/contractReportByType.js',CClientScript::POS_END); ?>

<h1>Contract By Type</h1>
<div class="form">
	<?php $form = $this->beginWidget('CActiveForm',array('id'=>'contractReportForm')); ?>
	<div class="row">
		<?php echo $form->label($model,'custno'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiAutoComplete',array(
			   	'model'=>$model,
			   	'attribute'=>'custno',
			    'sourceUrl'=>'index.php?r=ajax/searchCustomer',
			    'options'=>array(
			        'minLength'=>'2',
			        
			    ),
			    'htmlOptions'=>array(
			        'style'=>'height:20px;',			   
			    ),
		));?>
		<?php echo $form->error($model,'custno'); ?>
	</div>
	<div class="row">
		<?php echo $form->label($model,'type'); ?>
		<?php echo $form->dropDownList($model,'type',$model->getTypeList()); ?>
		<?php echo $form->error($model,'type'); ?>
	</div>
	<div class='row'>
		<?php echo $form->label($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status',$model->getStatusList()); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>
	<div class='row'>
		<?php echo $form->label($model,'payment'); ?>
		<?php echo $form->checkBox($model,'payment'); ?>
		<?php echo $form->error($model,'payment'); ?>
	</div>
	<div class='row'>
		<label>Action</label>
		<div class="model-data">
			<a class="print-button" onclick="viewPrint()"> View &amp; Print</a>|
		  	<a class="email-button" onclick="createMailPanel()"> Email</a><br>
		</div>
	</div>
	
	<?php $this->endWidget(); ?>
</div>